package com.ssm.helong.shop.config;

import com.ssm.helong.shop.util.Result;
import com.ssm.helong.shop.util.ResultGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Description:
 * @author: helong.sun
 * @date: 2021-04-30 16:16
 * @Version 1.0
 **/
@RestControllerAdvice
@Slf4j
public class ShopExceptionHandler {

//    @ResponseBody
//    @ExceptionHandler(Exception.class)
//    public Result businessInterfaceException(Exception e) {
//        log.info("服务器异常===========================，{}",e);
//        return ResultGenerator.genFailResult("服务器异常");
//    }




}
